#include <57header.h>

void func(int num){
    printf("func begin \n");

    sleep(10);

    sigset_t set, old;
    sigemptyset(&set);
    sigemptyset(&old);

    sigprocmask(SIG_BLOCK, &set, &old);

    if(sigismember(&old, 2)){
        printf("2号信号, 在mask设置了阻塞 \n");
    }

    printf("func over \n");
}
int main(int argc,char*argv[])
{

    signal(2, func);

    while(1);
    return 0;
}

